/**
 * 
 */
package com.game.entity;

import java.awt.Polygon;
import java.awt.Rectangle;

import com.game.entity.generic.BaseVectorShape;

/**
 * @author gustavo
 * 
 */
public class Asteroid extends BaseVectorShape {

	// definindo o formato do poligono do asteroide
	private int[] astx = { -20, -13, 0, 20, 22, 20, 12, 2, -10, -22, -16 };
	private int[] asty = { 20, 23, 17, 20, 16, -20, -22, -14, -17, -20, -5 };

	// velocidade de rotação
	protected double rotVel;

	public double getRotationVelocity() {
		return rotVel;
	};

	public void setRotationVelocity(double v) {
		this.rotVel = v;
	};

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.generic.BaseVectorShape#getBounds()
	 */
	@Override
	public Rectangle getBounds() {
		// TODO Auto-generated method stub
		return new Rectangle((int) getX() - 20, (int) getY() - 20, 40, 40);
	}

	/**
	 * 
	 */
	public Asteroid() {
		setShape(new Polygon(astx, asty, astx.length));
		setAlive(true);
		setRotationVelocity(0.0);
	}

}
